<template>
  <mt-button @click="go">跳转</mt-button>
</template>
<script>
import { Button } from 'mint-ui'
import {mapMutations, mapGetters} from 'vuex'
export default {
  data () {
    return {
      list: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
    }
  },
  components: {
    'mt-button': Button
  },
  computed: {
    ...mapGetters(['store'])
  },
  methods: {
    ...mapMutations({setStore: 'ADDLIST'}),
    go () {
      this.setStore({code: 'G999908', name: '张三'})
      this.$router.push('/getPage')
    }
  }
}
</script>
